import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Button',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyStatelessWidget(),
    );
  }
}

class MyStatelessWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    //定义文本样式

    return Scaffold(
      appBar: AppBar(
        title: Text("Button"),
      ),
      //流失布局
      body: Wrap(
        //盒子横向间距25
        spacing: 25,
        //盒子垂直方向间距10
        runSpacing: 10,
        //对齐方向
        alignment: WrapAlignment.end,
        children: <Widget>[
          Container(
            width: 100,
            height: 200,
            color: Colors.red,
          ),
          Container(
            width: 100,
            height: 200,
            color: Colors.blue,
          ),
          Container(
            width: 200,
            height: 200,
            color: Colors.yellow,
          )
        ],
      )
    );
  }

}
